home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / Animation Assistant API / Delete Events Example / IASInterface.h < prev   
Encoding:
C/C++ Source or Header  |  1994-08-18  |  3.1 KB  |  157 lines  |  [TEXT/KAHL]

  1. #if 0
  2. /****************************************************************************************
  3.  
  4.  
  5.         IASInterface.h
  6.  
  7.  
  8.         ©1993 Specular International Ltd.
  9.  
  10.  
  11.         Revision History
  12.  
  13.         when        who            what & why
  14.         ==========    ==========    ======================================================
  15.         3/1/94        paul        added "id" fields to structs
  16.         2/19/94        paul        updated to new plugin interface
  17.         
  18. *****************************************************************************************/
  19. #endif
  20.  
  21. #ifndef _IASInterface_
  22. #define _IASInterface_
  23.  
  24.  
  25.  
  26. /**  File/Resource types & IDs.  **/
  27. #define kIASPlugInFileType        'IASp'
  28.  
  29. #define kIASPlugInCodeType        'IASp'
  30. #define kIASPlugInCodeID        128
  31. #define kIASPlugInVersionType    'IASv'
  32. #define kIASPlugInVersionID        128
  33. #define kIASPlugInFlagsType        'IASf'
  34. #define kIASPlugInFlagsID        128
  35.  
  36.  
  37.  
  38.  
  39. enum {        /**  Animation Assistant messages.  **/
  40.  
  41.     kIAS_SetupStorage = 'setu',
  42.     kIAS_GetParams = 'getp',
  43.     kIAS_ManipulateEvents = 'mane',
  44.     kIAS_CleanUpStorage = 'clen'
  45.  
  46. };
  47.  
  48.  
  49.  
  50.  
  51. /**  Animation Assistant <flags> bit constants.
  52.  ** The kIAS_PluginTakesParameters flag is currently used to add
  53.  ** an ellipsis (…) to the menu item when the Assistant takes
  54.  **    parameters. To add the ellipsis, use ResEdit to change the last
  55.  **    byte of the IASf resource from 00 to 01 in the resource template
  56.  **    (ResEdit file) provided.
  57.  **/
  58. #define kIAS_PluginTakesParameters            0x00000001
  59.  
  60.  
  61. /**  Version constant.  
  62.  **    The version constant is set in the IASv resource of the template.
  63.  **/
  64. #define kIAS_CurrentVersion                    0x00000001
  65.  
  66.  
  67.  
  68. enum {        /**  object types  **/
  69.  
  70.     k_IAS_sphere = 0,
  71.     k_IAS_square,
  72.     k_IAS_plane, 
  73.     k_IAS_cube, 
  74.     k_IAS_cylinder, 
  75.     k_IAS_cone, 
  76.     k_IAS_extrude = 7, 
  77.     k_IAS_lathe, 
  78.     k_IAS_terrain,
  79.     k_IAS_light = 12, 
  80.     k_IAS_camera, 
  81.     k_IAS_freeform, 
  82.     k_IAS_mesh,
  83.     k_IAS_font
  84.  
  85. };
  86.  
  87.  
  88.  
  89. typedef struct vec3D {
  90.  
  91.     float x, y, z;
  92.  
  93. } Vec3D;
  94.  
  95.  
  96.  
  97.  
  98. typedef struct IASEvent {
  99.  
  100.     struct IASEvent        *next;
  101.     struct IASEvent        *prev;
  102.     
  103.     long                id;                    /**  Internal ID, don't change for existing
  104.                                                  event, set to 0 for new ones.  **/
  105.     float                time;                /**  In seconds, set to -1 to delete this event.  **/
  106.     short                spline;                /**  TRUE if spline between this and next  **/
  107.     short                flags;
  108.     short                ease_in;            /**  0 to 100, generally  **/
  109.     short                ease_out;            /**  0 to 100, generally  **/
  110.     
  111.     /**  the following only affects the object itself  **/
  112.  
  113.     Vec3D                 dimension;
  114.     Vec3D                offset;
  115.  
  116.     /**  everything below affects the children objects as well  **/
  117.  
  118.     Vec3D                scale;                /**  for now, keep x = y = z  **/
  119.     Vec3D                 rotation;
  120.     Vec3D                 position;
  121.  
  122. } IASEvent, *IASEventPtr;
  123.  
  124.     
  125.  
  126.  
  127.  
  128. typedef struct IASObjectInfo {                    /**  All fields are informative only;
  129.                                                      none should be modified other than
  130.                                                      the <selected_events> ptr if the
  131.                                                      head of the event chain changes.  **/
  132.     
  133.     struct IASObjectInfo        *next;
  134.     struct IASObjectInfo        *prev;
  135.     
  136.     long                        id;
  137.     
  138.     short                        type;
  139.     short                        flags;
  140.     IASEventPtr                    selected_events;
  141.  
  142.     unsigned char                name[32];            /**  p-string.  **/
  143.     
  144. } IASObjectInfo, *IASObjectInfoPtr;
  145.  
  146.  
  147.  
  148.  
  149. typedef unsigned long            (*IASProcPtr)(    long        message,
  150.                                                 void        *param,
  151.                                                 void        *storage    );
  152.  
  153.  
  154.  
  155.  
  156. #endif
  157.